Activation method for accessories in model vehicle layout

ABSTRACT

A method and apparatus for determining a model vehicle layout by moving a vehicle around the track and noting when the vehicle passes track position detection elements. The vehicle can either detect the position detection elements, or the position detection elements can be sensors which detect the vehicle. By noting the order of the position detection elements as detected, and the direction of the vehicle, the layout of the track can be determined. In one embodiment, the position detection elements are sensors along the track which detect an emitted ID from the vehicle, and also detect the speed and direction of the vehicle. This information is then relayed to a control system. In another embodiment, the vehicle detects the position detection element, and relays this information, along with the train ID, speed and direction, to the control system. In another aspect of the invention, a particular type of vehicle at a particular location can be identified, and can be used to selectively operate accessories adjacent that portion of the track. The invention also can provide automated route generation, the route between A and B meeting input route parameters (e.g., backing into destination) can be automatically determined. Also, default accessory and switch selection can be automatically provided to a hand-held controller based on what the vehicle is approaching.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a division of U.S. application Ser. No.10/346,558, filed Jan. 16, 2003, entitled “Dynamic Self-teaching TrainTrack Layout Learning and Control System”, which claims priority fromProvisional Application No. 60/349,851, filed Jan. 17, 2002, entitled“Dynamic Self-Teaching Train Controller”, which disclosures areincorporated herein by reference.

STATEMENT AS TO RIGHTS TO INVENTIONS MADE UNDER FEDERALLY SPONSOREDRESEARCH OR DEVELOPMENT

[0002] NOT APPLICABLE

REFERENCE TO A “SEQUENCE LISTING,” A TABLE, OR A COMPUTER PROGRAMLISTING APPENDIX SUBMITTED ON A COMPACT DISK

[0003] NOT APPLICABLE

BACKGROUND OF THE INVENTION

[0004] The present invention relates to model vehicles, in particularmodel trains, and more particularly to systems for locating trains anddetermining a track layout.

[0005] After model train tracks are put in place, trains can be runacross them under a variety of control systems. In one system, the powerto the track is increased, or decreased, to control the speed anddirection of the train. Multiple trains can be controlled by providingdifferent power levels to the different sections of the track havingdifferent trains (see, e.g., U.S. Pat. No. 5,638,522). In anothersystem, a coded signal is sent along the track, and addressed to thedesired train, giving it a speed and direction. The train itselfcontrols its speed by converting the AC voltage on the track into thedesired DC motor voltage for the train according to the receivedinstructions. The instructions can also tell the train to turn on or offits lights, horns, etc. U.S. Pat. Nos. 5,749,547 and 5,638,522 issued toNeil Young et al. show such a system.

[0006] The arrival of a train on a section of track can be detected insome systems, such as by detecting the load on the current applied tothe track, and can be used to activate certain elements connected to thetrack, such as a switch or a stoplight (see, e.g., U.S. Pat. No.5,492,290).

[0007] U.S. Pat. No. 4,349,196 shows a system with a unique bar code onthe bottom of each train car, with detectors mounted in the track below.This allows a determination of which car is over the sensor, and whichcars have been assembled in a train. U.S. Pat. No. 5,678,789 shows asystem with sensors in the track for detecting the position and velocityof a passing train.

[0008] U.S. Pat. No. 6,480,766 contains a discussion of differentsystems, including satellite Global Positioning Systems (GPS) fordetermining the location of a particular full sized (not model) train.U.S. Pat. No. 5,803,411 shows a train which detects position indicatorsalong the side of a track, and provides these to an onboard computer fordetermining the position, speed, etc. of the train.

[0009] A system where a user can input commands to generate a graphicalrepresentation of a train track layout is shown, for example, in U.S.Pat. No. 6,460,467.

BRIEF SUMMARY OF THE INVENTION

[0010] The present invention provides a method and apparatus fordetermining a model vehicle layout by moving a vehicle around the trackand noting when the vehicle passes track position detection elements.The vehicle can either detect the position detection elements, or theposition detection elements can be sensors which detect the vehicle. Bynoting the order of the position detection elements as detected, and thedirection of the vehicle, the layout of the track can be determined. Theposition detection elements do not need to provide a position, butmerely have separate IDs so they can be matched to a block of the track.

[0011] In one embodiment, the position detection elements are sensorsalong the track which detect an emitted ID from the vehicle, and alsodetect the speed and direction of the vehicle. This information is thenrelayed to a control system. In another embodiment, the vehicle detectsthe position detection element, and relays this information, along withthe train ID, speed and direction, to the control system. This secondembodiment eliminates the need to connect sensors to the control system.

[0012] In another aspect of the invention, a particular type of vehicleat a particular location can be identified, without using an expensiveGPS system. This is accomplished through transmission of a vehicle ID,which can be associated with characteristics of the vehicle, and theposition detection element. The type of vehicle can be used toselectively operate accessories adjacent that portion of the track. Forexample, only trains with open top cars can activate a grain loadingaccessory along the track.

[0013] The invention also can provide automated route generation, theroute between A and B meeting input route parameters (e.g., backing intodestination) can be automatically determined. The determined route canthen be displayed, or automatically selected by controlling engine speedand direction and switches.

[0014] Also, default accessory and switch selection can be automaticallyprovided to a hand-held controller based on what the vehicle isapproaching. This eliminates the need for a user to select theappropriate switch or accessory when the vehicle is approaching them.The system assumes the next accessory or switch in the direction thevehicle is heading is the one the user will want to control next, andassociates that switch with a switch control, and that accessory with anaccessory control.

[0015] Other applications of the present invention will become apparentto those skilled in the art when following the description of the bestmode contemplated for practicing the invention this read in conjunctionwith the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The description herein makes reference to the accompanyingdrawings wherein like reference numerals refer to like parts throughoutthe several views, and wherein:

[0017]FIG. 1 is a side view of a model train car with a transmitteraccording to an embodiment of the present invention;

[0018]FIG. 2 is a schematic representation of a transmitter according toan embodiment of the present invention;

[0019]FIG. 3 is an isometric view of a track section with a receiveraccording to an embodiment of the present invention;

[0020]FIG. 4 is a schematic representation of a receiver according to anembodiment of the present invention;

[0021]FIGS. 5A and 5B illustrate a track layout according to anembodiment of the present invention;

[0022]FIG. 6 is a schematic representation showing the receiverconnected to the main control unit which in turn is used to operateaccessories;

[0023]FIG. 7 is a schematic representation showing the communicationline according to an embodiment of the present invention;

[0024]FIG. 8 is a flow chart detailing the steps for transmitting amessage by a transmitter according to an embodiment of the invention;

[0025]FIG. 9 is a schematic representation of a message exchangedbetween a transmitter to a receiver according to an embodiment of thepresent invention;

[0026]FIG. 10 is a schematic representation of a burst communicated aspart of a message according to an embodiment of the present invention;

[0027] FIGS. 11A-F are schematic representations of the construction ofan integrity byte according to an embodiment of the present invention;

[0028]FIG. 12 is a flow chart detailing the steps for receiving amessage by the receiver according to an embodiment of the presentinvention;

[0029]FIGS. 13A-13C illustrate dynamic information exchange between thetransmitter to the receiver according to an embodiment of the presentinvention;

[0030] FIGS. 14A-E are illustrations of events that can be controlled bya controller according to an embodiment of the present invention;

[0031]FIG. 15A is a flow chart detailing the steps for transmittinginformation to the controller by a receiver or actuator according to anembodiment of the invention; and

[0032]FIG. 15B is a flow chart detailing the steps for transmitting acommand to a receiver or actuator by the controller according to anembodiment of the present invention.

[0033]FIG. 16 is a diagram illustrating blocks and a switch for aportion of a track layout in a simple embodiment of the invention.

[0034]FIG. 17 is a table illustrating the representation of the blocksof FIG. 16 in a controller memory.

[0035]FIGS. 18 and 19 are diagrams illustrating the building of a tablein memory to indicate block interconnections.

[0036]FIG. 20 is a diagram of a crossover block segment according to anembodiment of the invention.

[0037]FIG. 21 is a diagram of a portion of a table corresponding to thecrossover of FIG. 20.

[0038]FIG. 22 is an example layout according to an embodiment of theinvention, showing an example of a graphical display.

[0039]FIG. 23 is a table illustrating a numerical representation of thelayout of FIG. 22 in controller memory.

DETAILED DESCRIPTION OF THE INVENTION

[0040] Active Sensor Embodiment

[0041] The present invention provides a method and apparatus forcontrolling one or more model trains moving along a path formed byseveral inter-connected sections of model train track. The inventionincludes a transmitter 10 connected to a model train car 16, at leastone receiver 12 positionable along the path, and a controller 14.Transmitter 10 can transmit information associated with the car 16, suchas car type and car number, to receiver 12. Receiver 12 can receive theinformation from the transmitter 10 and communicate the information tothe controller 14 with a serial communication line. The controller 14can receive information from receiver 12 and emit commands to the car 16in accordance with a control program stored in memory.

[0042] Referring now to FIG. 1, transmitter 10 is operably engaged withcar 16. Transmitter 10 is moved along the path 18 as the car 16 movesalong the path 18 and can transmit information associated with car 16 toreceiver 12 (shown in FIG. 2) when car 16 is in predetermined proximitywith receiver 12. Transmitter 10 is engaged with car 16 on a surface 22of the car 16 that opposes the path 18 so that transmitter 10 isdirected towards the path 18. However, the transmitter 10 can bedirected in any direction with respect to the path 18 so long as thereceiver 12 is correspondingly positioned to receive the information.Car 16 can be an engine, a caboose, a cargo car or a passenger car.

[0043] Preferably, each car 16 moving along the path 18 includes atransmitter 10. However, the invention can be practiced whereintransmitters 10 are engaged only with model train engines. In anotherembodiment of the invention, transmitters 10 are engaged with the modeltrain engines moving along the path 18 and less than all the other carsmoving

[0044] The transmitter 10 can be powered by the same power source thatpowers the car 16. If the car 16 is not an engine, the car 16 can beadapted to receive power from the same source that supplies power tomodel train engines moving along the path 18.

[0045] Referring now to FIG. 2, transmitter 10 can include a controller44 and a light emitting diode 46. The controller 44 can control thelight emitting diode 46 to emit infrared radiation pulses in apredetermined pattern. The predetermined pattern corresponds toinformation associated with the car. The predetermined pattern can bedefined by the duration of individual infrared radiation pulses and thetime period between pulses. Transmitter 10 can continuously repeat thepredetermined pattern to enhance the likelihood that the informationwill be accurately received by the receiver 12.

[0046] In a preferred embodiment of the present invention, thetransmitter 10 is a modulated infrared emitter, operable to emitinfrared radiation having a wavelength in the range of 800 nanometers to1000 nanometers. In a more preferred embodiment, the light emittingdiode 46 emits infrared radiation in the range of 870 nanometers to 940nanometers. Emitting infrared radiation within the range of 800nanometers to 1000 nanometers enhances the rejection of visible light bythe receiver 12. Visible light detracts from the quality of theinformation exchanged between the transmitter 10 and the receiver 12. Alight emitting diode 46 is available for purchase from manymanufacturers, including Lite On®, part number LTE-4206, and Toshiba®,part number TLN110. Preferably, the emission angle of the light emittingdiode 46 is from 15° to 25° and the energy level is approximately 0.7mW/cm2.

[0047] The controller 44 can be operably associated with the engine 43of a model train car to determine the speed of the engine 43 as well asthe hours of operation of the engine 43. The controller 44 cancommunicate this information to the receiver 12 by controlling the lightemitting diode to emit a predetermined pattern of infrared radiationpulses. Also, the controller 44 can receive electromagnetic wave signalsfrom the controller 14 or from another source and stop the engine 43 orreduce the speed of the engine 43 in response to the wave signals. Withrespect to other sources of wave signals, a human operator, for example,can cause wave signals to be directed to the controller 44 to slow orstop the engine 43.

[0048] The transmitter 10 can emit a plurality of differentpredetermined patterns of infrared radiation pulses corresponding todifferent information or can emit a single predetermined pattern. Forexample, a first predetermined pattern can correspond to a car number ofthe car. A second predetermined pattern can correspond to a car type,such as a caboose, engine, passenger car or cargo car. Furthermore,various categories of cars can be further defined to enhance thespecificity of the information transmitted by the transmitter. Forexample, the transmitter can transmit a message to the receiver thatindicates that the car 16 is a cargo car carrying the particular type ofcargo. In an embodiment of the invention in which the controller 44communicates with the engine 43, the information communicated caninclude the hours of operation of the engine 43 and/or the motor speedof the engine 43. In a preferred embodiment of the invention, thetransmitter 10 can at least emit a first predetermined pattern ofinfrared radiation pulses corresponding to a car number of the car

[0049] Referring now to FIG. 3, receiver 12 is positionable along thepath 18, can receive information from a transmitter, and can communicatethe information to the controller 14. Receiver 12 can receiveinformation from the transmitter when the transmitter is inpredetermined proximity with the receiver 12. Receiver 12 is engagedwith a track section 20. Preferably, a pair of receivers 12 and 12 a arepositioned at opposite ends of each track section 20 and each receiverincludes two detectors 25 and 26. However, the receiver 12 can includeonly one detector 25. The detectors 25 and 26 detect the predeterminedpattern of infrared radiation pulses from the light emitting diode 46 ofthe transmitter 10 and communicate the predetermined pattern to aprocessor 28 of the receiver 12. An obstructing member 30 can bepositioned between the detectors 25 and 26 to limit a range of receptionof the detectors 25 and 26 with respect to each other. Also, thedistance between the detectors 25 and 26 can be varied to control therange of reception of each detector 25 or 26 with respect to each other.

[0050] The detectors 25 and 26 are mountable on an upwardly facingsurface 27 of the track section 20 to receive the information from thetransmitter 10. However, the detectors 25 and 26 can be positionedadjacent a track section 20 if the transmitter does not transmitinformation toward the path 18.

[0051] Referring now to FIG. 4, receiver 12 can also include anamplifier 90 and a filter 92. The amplifier 90 can reduce errors causedby the reception of multiple signals at a single receiver 12. Inparticular, the gain of the amplifier 90 can be selected to control therange of reception. The amplifier 90 permits a predetermined range ofreception for signal information recovery, but limits the predeterminedrange to exclude adjacent track sections. The filter 92 can rejectambient light pulses of the same wave length as the signal emitted bythe transmitter 10. The receiver 12 can be tuned to the same wavelengthas the transmitter to provide band pass filtering.

[0052] Processor 28 can receive signals from detectors 25 and 26corresponding to the predetermined pattern of infrared radiation pulsestransmitted by the transmitter 10. Processor 28 converts the signalsreceived from the defectors 25 and 26 into a form of information usableby the controller 14 and communicates the information to the controller14. In addition, the processor 28 can uniquely identify the receiver 12to the controller 14 with respect to every other receiver or any otherdevice communicating with the controller 14 positioned along the path.The processor 28 will identify the receiver 12 to the controller 14 eachtime information is communicated to the controller 14.

[0053]FIGS. 5A and 5B represent portions of a path 18 formed by theinter-connected sections of track 20. The portions of the path 18 shownin FIGS. 5A and 5B are connected at joints 201, 202, 203, 204, 205, 206and 207.

[0054] Referring now to FIG. 5A, receivers 12 are positioned along thepath 18. In order to enhance the clarity of FIG. 5; most of thereceivers 12 are represented along the path 18 as simply detectors 25.However, it is to be recognized that each receiver 12 will also includea processor in communication with the detectors 25 and the controller14. The present invention can be practiced wherein a section 20 a oftrack has no receivers. However, the number of track sections 20 a alongthe path 18 is preferably minimized. The path 18 can also includesections 20 b that include one receiver 12. Also, relatively longersections 20 c of track can include more than two receivers 12.Specialized sections of track such as a x-shaped section 20 d of trackor a y-shaped section 20 e of track can include four or three receivers12 a, respectively. In addition, a y-shaped section 20 f of track caninclude only two receivers 12. The position and number of receivers 12along the path 18 can be varied as needed.

[0055] Referring now to FIG. 5B receiver 12 can be positioned adjacentthe end 42 of a branch of the path 18 a wherein the distance between thereceiver 12 and the end 42 is of sufficient length to permit the car 16to stop before reaching the end 42.

[0056] The controller 14 can communicate with each of the receivers 12positioned along the path 18. To enhance the clarity of FIG. 5B, thecontroller 14 is shown communicating only with two receivers 12.However, it is to be noted that the controller 14 will communicate witheach receiver 12. The controller 14 can locate the position of the car16 along the path 18 by communicating with the receivers 12.

[0057] The controller 14 can also communicate with actuators 13positioned along the path 18. Actuators 13 can communicate informationto the controller 14 and receive commands from the controller 14. Forexample, the present invention can be practiced with actuators that canmove track switches between two positions, or with actuators that canactivate a light emitting device such as crossing light or stationlight, or with actuators that can emit sounds such as crossing bells ora horn. The controller 14 can receive information from receivers 12 withrespect to the location of a model train moving along the path andengage actuators to control the movement of the model train or activateaccessories positioned along the track, adjacent to the model train orin advance of the model train, to enhance the realism of the model trainsystem.

[0058] Actuator 13 a includes at least one detector 17 positioned alongthe path 18. To enhance the clarity of FIG. 5, the controller 14 isshown communicating only with one actuator 13 and one actuator 13 a.However, it is to be noted that the controller 14 can communicate witheach actuator 13 and with each actuator 13 a.

[0059] Referring now to FIG. 6, the actuator 13 b can include aprocessor 19 that can receive information corresponding to apredetermined pattern of infrared radiation pulses detected by detector17. Processor 19 can convert a signal received by the detector into aform of information usable by the controller 14. In addition, theprocessor 19 can uniquely identify the actuator 13 b with respect toevery other receiver and actuator positioned along the path. Theprocessor 19 will identify the actuator 13 b to the controller 14 eachtime information is communicated to the controller 14.

[0060] The processor 19 can also receive commands from the controller 14to actuate a model train accessory. The accessory can be a moveableaccessory 15 such as a track switch or can be an electrically engageableaccessory 15 a such as a light. The actuator 13 b is shown engaging botha moveable accessory and an electrical accessory. The invention can alsobe practiced with an actuator engageable with only a moveable accessoryor engageable only with an electrical accessory. The actuator 13 b caninclude actuating means 21 for moving accessory 15. Actuating means 21can be any electro-mechanical means for moving known in the art. Forexample, means 21 can be an electric motor, a linear screw mechanism oran electrically driven cam and cam follower mechanism.

[0061] Referring now to FIG. 7, the controller 14 can communicate withactuators 13 c, actuators 13 d and receivers 12 with a serialcommunication line 130, such as an RS485 system. The line 130 caninclude a four wire interface having RJ11 phone connection having fivevolt power and ground power return. Bit transmission speed can be 100kilobytes per second and 10 microseconds per bit at a minimum. Thesystem can be operable to transmit at 250 kilobytes per second and 2.5microseconds per bit. The system communicates in an asynchronous formatwith eight data bytes per character and a ninth bit used as thebeginning of a message marker. Each transmission includes eleven bits.The software used for managing the system can have a byte transmissionspeed of 9.09 K bytes/sec and 110 μsec/byte. In one embodiment, thesystem will have a byte transmission speed of 22.7 K bytes/sec and 44μsec/byte. Other speeds and formats can be used, the above is simply anexample.

[0062] The system can also include a booster or amplifier 138 to amplifysignals carried by the line 130 and prevent degradation of the signals.The system can also include a termination module 140 having an lightemitting diode 142. The termination module 140 can verify the stabilityof the system with the light emitting diode 142. For example, if thesystem fails, the light emitting diode 142 can be disengaged.

[0063] The present invention also provides a communication system forcontrolling one or more model trains moving along a path formed byseveral inter-connected sections of model train track. Controlling themovement of at least one model train moving along the path in enhancedby the accurate transmission of information. Information communicated bythe communication system includes information corresponding to eachmodel train car moving along the path as well as informationcorresponding to commands emitted by the controller to control themovement of each model train car and to control accessories. Thecommunication system of the present invention enhances the accuracy ofthe information received by the controller as well as the accuracy ofcommands received by actuators positioned along the path.

[0064] Information corresponding to the model train car moving along thepath is transmitted from the model train car by the transmitter and isreceived by the receiver. The information corresponding to a model traincar that can be transmitted includes car number, car type, engine speedof model train engine and operating hours of a model train engine.Preferably, each train car moving along the path is assigned a differentcar number than every other train car moving along the path. However,two train cars moving along the path can have the same car number if thetwo cars can be distinguished from each other as being different cartypes. The information corresponding to the model train car can bestored in memory of the transmitter in four bit format.

[0065] Referring to FIG. 8, a simplified flow diagram illustrating thesteps for transmitting information by the transmitter is provided. Theprocess starts at step 48. At step 50, the information to be transmittedis retrieved from memory. The information includes at least twocomponents: index data and parameter data. Index data corresponds to agenus of information and parameter data corresponds to a species ofinformation within the genus. For example, the index data can correspondto the genus model train engines and the parameter data can correspondto a particular model train engine. In a preferred embodiment of thepresent invention, index values are assigned according to the tableprovided immediately below: Index Value Parameter Data 0 Car Number 1Car Type 2 Engine Speed MSB 3 Engine Speed LSB 4 Operating Hours MSB 5Operating Hours LSB

[0066] At step 52, the index data and parameter data are used tocalculate an integrity byte. The integrity byte will be transmitted bythe transmitter with the index data and parameter data. After receivingthe information from the transmitter, the receiver can compare theintegrity byte to the index data and the parameter data to verify theaccuracy the index data and the parameter data. If the integrity byte isnot consistent with respect to the index data and the parameter data,the receiver can reject the information received from the transmitter aserroneous. The method for calculating the integrity byte will bedescribed in greater detail below.

[0067] At step 54, the index data, parameter data and the integrity byteare converted into nibbles. As used herein, a nibble is a quantity ofdata having four bits.

[0068] At step 56, each nibble is converted from a four bit format to afive bit format. The nibbles are encoded from four bit to five bit databy the transmitter and decoded from five bit data to four bit data bythe receiver. Encoding the information enhances the accuracy ofinformation transmitted by the transmitter and received by the receiver.In particular, four to five bit encoding doubles the number of bitcombinations and enhances the detection of invalid transmissions by thereceiver because half of the total number of combinations are known tobe invalid. The present invention can be practiced with encryption thatencodes the four bit data into any number of bits greater than five,such as “four to six” bit encoding.

[0069] After the completion of steps 50 through 56, the transmitter canbegin to transmit information to be received by the receiver. Theinformation will be transmitted as a message including the index data,parameter data and the integrity byte. The transmitter can be operableto transmit more than one message. Each message will be transmitted as apredetermined pattern of infrared radiation pulses. Acceptance of themessage by the receiver for communication to the controller isdetermined by comparing the pattern of pulses to a communicationprotocol. The communication protocol defines a plurality of successivetime periods during which infrared radiation pulses must be received bythe receiver. If the pulses are not received by the receiver accordingto the time periods defined by the communication protocol, theinformation is rejected by the receiver and not communicated to thecontroller. The communication protocol will be discussed in greaterdetail below.

[0070] The steps for transmitting information by the transmittercontinues at step 58 and the light emitting diode generates infraredradiation pulses corresponding to the information to be transmitted.Step 62 monitors whether the entire message has been sent. If not, theprocess returns to step 58 and the additional information istransmitted. If the information has been fully transmitted, the processcontinues to step 64 and is delayed according to the communicationprotocol. The delay lasts more than 150 microseconds. After the delay,the process returns to step 50.

[0071] Referring now to FIG. 9, a sample message 32 conforming to thecommunication protocol of a preferred embodiment of the invention isillustrated. Horizontal line 34 is a schematic representation of time.The predetermined pattern of message 32 is defined by bits 38,representing an operational state of the light emitting diode of thetransmitter, and can be divided into eight distinct bursts 36 a-36 h ofdata. Each burst of data can be divided into six bits 38 of data.

[0072] Referring now to FIG. 10, each bit 38 a-38 h represents anoperational state of the light emitting diode during a particular timeperiod. The light emitting diode can be on or off and the receiver canassign a value to each bit 38 a-38 h based on the operational state. Forexample, if the light-emitting diode is emitting infrared radiationduring the period of the second bit 38 b, bit 38 b can be assigned avalue of 0 by the receiver. Conversely, if the light-emitting diode isnot emitting infrared radiation during the period of the second bit 38b, bit 38 b can be assigned a value of 1 by the receiver. Bits 38 a-38 fare schematic representations and can have a value of 1 or 0. Each bit38 preferably lasts 4 microseconds, 30+/−20%.

[0073] The first bit 38 a, or start bit, of the first burst 36 ainitiates the exchange information between the transmitter and thereceiver. Preferably, the start bit 38 a will always be 0, representingthat the light-emitting diode is on. The start bit can be assigned avalue of 0 to synchronize the timing sequence of data transmission. Ifthe start bit 38 a were not assigned a value of 0, the receiver couldnot verify when a second burst begins after a first burst has ended.

[0074] The five bits 38 b-38 f of burst 36 a correspond to the nibble ofthe data. The five data bits 38 b-38 f can correspond to index data, orparameter data, or the integrity byte.

[0075] The time period lasting from the beginning of a first bit 38 a tothe beginning of a second bit 38 b is preferably 10 microseconds, +/−5%.The time period lasting from the beginning of the last bit 38 f of afirst burst 36 i to the beginning of a first bit 38 g of a second burstis between 104 microseconds to 150 microseconds. The time period lastingbetween the beginning of the last bit of the last burst of a firstmessage to the first bit of the first burst of a second message isgreater than 150 microseconds. In a preferred embodiment of the presentinvention, the receiver recognizes the beginning of a new message if theperiod of time between the start of the bit 38 a to the start of the bit38 g is greater than 150 microseconds.

[0076] Each burst must contain at least two bits assigned a value of 0,in addition to the start bit. A burst received by a receiver that doesnot include two or three bits having an assigned value of 0 will beconsidered invalid by the receiver and will not be communicated to thecontroller. Furthermore, if one burst of a particular message isrejected, the entire message is rejected. It has been recognized that byrequiring each burst to include at least two bits having an assigned avalue of 0 increases the likelihood that the information to betransmitted will be accurately transmitted to the receiver. It isassumed that by requiring at least two bits assigned a value of 0 tendsto enhance the rejection of bursts corrupted by natural light,electrical noise or other infrared sources.

[0077] In a preferred embodiment of the invention, data is communicatedaccording to the burst pattern provided immediately below: Burst ValueHex Data Value 001011 0 010011 1 010100 2 001001 3 010110 4 000101 5001110 6 010010 7 001010 8 000110 9 011010 A 001100 B 001101 C 010101 D011001 E 010001 F

[0078] Each burst can be asynchronous with respect to the precedingburst. The time periods between successive bursts are selected toenhance the likelihood of successful data transmission. Specifically,the time periods associated with each component of a message 32 areminimized to enhance the likelihood that a message 32 can be transmittedseveral times while the transmitter is in predetermined proximity withrespect to the receiver even if the car 16 is traveling at its mostextreme velocity.

[0079] Referring now to FIG. 9, the first two bursts, 36 a and 36 b, ofthe message 32 correspond to index data. The third through six bursts,36 c through 36 f, correspond to parameter data. The seventh and eighthbursts, 36 g and 36 h, correspond to the correction byte. After burst 36h is an inter-message gap to separate the messages.

[0080] The index data included as the first two bursts 36 a and 36 b ofthe message 32 identifies the category of parameter data to betransmitted in the succeeding bursts 36 c through 36 f. The index ismade up of one byte of data and can contain up to 256 locations.Preferably, a value of 0 is assigned to the index representing thehighest priority data being transmitted by the transmitter 10.

[0081] The parameter data is data particular to the corresponding car 16and corresponds to the index data. For example, the index data of aparticular message can be 0, corresponding to a car number, and theassociated parameter data can be, by way of example and not limitation,25. The message communicated to the controller by the receiver wouldadvise the controller that train car number 25 is in predeterminedproximity to the receiver. Parameter data and index data can bepreprogrammed with respect to the transmitter. The parameter data for aparticular message is made up of two bytes of information. Preferably,the parameter data communicated by the transmitter to the receiver willat least include the number of the car.

[0082] Bursts 36 g and 36 h correspond to the integrity byte (thecorrection or check byte). The integrity byte enhances the likelihood ofsuccessful transmission of the message 32 between the transmitter andthe receiver. In particular, the integrity byte corresponds to theparameter data (rotated and exclusive-ORed) and is compared to theparameter data by the receiver (after reversing the exclusive-OR andshifting). If the integrity byte and the parameter data do notcorrespond, the message 32 is rejected as erroneous.

[0083] FIGS. 11A-F illustrate the construction of the integrity byte.The integrity byte includes two bursts and is made up of one byte ofinformation. Nibbles 94 a and 94 b correspond to one byte of parameterdata. The nibbles 94 a and 94 b can be converted to five bit format andtransmitted as bursts 36 c and 36 d shown in FIG. 9. The bursts 36 c and36 d represent the “MSB” parameter data. The term MSB refers to the mostsignificant byte. Each nibble contains four fields of data, nibble 94 ahaving fields 96 a through 96 d. The first nibble 94 c of the integritybyte is constructed by shifting the fields 96 a through 96 h of thenibbles 94 a and 94 b as shown in FIG. 11B. Each field 96 a through 96 hhas been shifted to the left. The shifted fields are then exclusive-ORedwith the unshifted fields to give the first nibble of the integritybyte. FIG. 11F shows that the first nibble of the integrity byte isnibble 94 c.

[0084] The second nibble of the integrity byte corresponds to the fifthand sixth bursts, 36 e and 36 f respectively, of the message 32. FIG.11C shows the nibbles 94 e and 94 f corresponding to the fifth and sixthbursts 36 e and 36 f of the message 32 of FIG. 9. The bursts 36 e and 36f represent the “LSB” parameter data. The term LSB refers to the leastsignificant byte. The fields 96 i through 96 p of the nibbles 94 e and94 f are shifted twice, and exclusive-ORed with the unshifted originalfields and the once shifted intermediate field to give the integritynibble. In FIG. 11D, the fields 96 i through 96 p are shown shifted onceto the left. In FIG. 11E, the fields 96 i through 96 p are shown shiftedtwice to the left with respect to the original position of the fields 96i through 96 p. The fields in 11D and 11E are exclusive ORed with theoriginal fields to construct the integrity byte. FIG. 11F shows theconstruction byte, unencrypted, having nibbles 94 c and 94 i. Othermethods of constructing a check byte could alternately be used.

[0085] The integrity byte is constructed by the transmitter 10 prior tothe encryption of the four bit index data and four bit parameter data toa five bit format. The integrity byte is also encoded from a four bitformat to a five bit format.

[0086] As noted above, each transmitter is operable to emit a pluralityof different signals, each signal corresponding to a different message.Also, the transmitter can continuously repeat each message orcontinuously repeat a series of different messages. In a preferredembodiment of the present invention, a message corresponding to an indexhaving a value of 0 is repeated every other message. For example, if anindex value of 0 corresponds to the car number, the messagecommunicating the car number is repeated every other message. Thetransmitter 10 can transmit a first message corresponding to a carnumber, then transmit a second message corresponding to a car type, andthen transmit a third message identical to the first messagecorresponding to the car number. By repeating the index 0 message, thehighest priority data is transmitted more often to increase thelikelihood of a successful transmission.

[0087] Referring to FIG. 12, the process steps for receiving thepredetermined pattern of infrared radiation pulses by the receiveraccording to an embodiment of the present invention are shown. Theprocess starts at step 70. The message is received from the transmitterat step 72. The message, in the form of a predetermined pattern ofinfrared radiation pulses, can be filtered by a high frequency by-passfilter and amplified at step 74. Step 76 rejects the message if theinter-message gap has not been detected. The gap is greater than 150microseconds. If the gap is detected, the process continues and step 78assigns a numeric value to each bit of each burst. Each bit can beassigned a value of 1 or 0 to correspond to an operational state of thelight emitting diode.

[0088] Step 80 confirms that all bursts include a start bit having anassigned value of 0, corresponding to the light emitting diode being on.If any of the bursts do not have a start bit assigned a value of zero,the process returns to step 72 and the message is not communicated tothe controller 14.

[0089] Step 82 confirms that all bursts include at least two bits inaddition to the start bit having and assigned value of 0, correspondingto the light emitting diode being on. If any of the bursts do not haveat least two bits in addition to the start bit having an assigned valueof zero, the process returns to step 72 and the message is notcommunicated to the controller 14.

[0090] Step 84 converts the five data bits of each burst into four bitnibbles. Step 86 compares the integrity byte to the parameter data. Thecomparison of integrity byte to the parameter data can correspond to acomparison of the bits of integrity byte with the bits of the MSB dataand LSB data. If the integrity byte does not correspond to the parameterdata, the process returns to step 72 and the message is not communicatedto the controller 14. If the integrity byte does correspond to theparameter data, the message is communicated to the controller 14 at step88 and the process returns to step 72.

[0091] Passive Sensor Embodiment

[0092] In another embodiment of the invention, the train detects thesensors along the track, rather than the other way around. The sensorscan in fact be passive, such as a bar code or other marker that can beread. In one embodiment, the sensors constantly transmit a digitalpattern corresponding to their ID, similar to the infrared transmissiondiscussed above. A receiver on the train detects this, and then forwardsit, along with the train ID, the train velocity and train direction, tothe master controller.

[0093] The train can determine its own velocity from the rotation of itswheels and can determine its own direction from whether positive ornegative voltage is applied to its motor, for example.

[0094] This embodiment eliminates the need for multiple sensors to beconnected to the controller, either by wires or wirelessly, to providethe desired position information. Instead, the train can itself transmitthe information, either wirelessly or through the wheels and train trackto the central controller. Each sensor, or position indicator, can bethen assigned a number as the train detects them, with the controllerdetermining which ones are next to each other as the train passes them.In one embodiment, each sensor transmits a unique ID.

[0095] Determination of Speed and Direction

[0096] Referring now to FIGS. 13A-13C, the transmitter and receiver canalso exchange information corresponding to the speed and direction ofthe model train. In FIGS. 13A through 13C, a car 16 is schematicallyshown passing over a receiver 12. The wheels of the car 16 engaging thesection 20 of track of the path 18 are not shown. Detectors 25 and 26are mounted on an upwardly facing surface 27 of the section 20. In FIG.13A, the detector 25 receives the signal from the transmitter 10 beforethe detector 26. The obstructing member 30 prevents the detector 26 fromreceiving the signal 10 simultaneously with respect to the detector 25.Receipt of the signal by the detector 25 is communicated to theprocessor 28 of the receiver 12. The processor 28 can communicate to thecontroller 14 that the car 16 is in proximity to the detector 25.

[0097] In FIG. 13B, the signal is received by both detectors 25 a and 26a. The processor 28 can communicate to the controller 14 the proximityof the car 16 to both the detectors 25 and 26. In FIG. 13C, only thedetector 26 receives the signal from the transmitter 10. The processor28 can communicate the proximity of the car 16, with respect to only thedetector 26, to the controller 14. The controller 14 can be programmedto determine the velocity of the car 16 based on the configuration ofthe receiver 12, specifically the distance between detectors 25 and 26and the difference, as measured in time, between the receipt of thesignal by the detector 25 and the receipt of the signal by the detector26. The controller 14 can determine the direction of movement of the car16 based on the sequence of receipt of the signal with respect todetectors 25 and 26.

[0098] The present invention can also be practiced wherein the processor28 is programmed to determine the speed and direction of the car 16. Thelogic steps performed by the processor 28 in computing the speed anddirection of the car 16 would be identical to the logic steps performedby the controller 14 described above. In such an embodiment of thepresent invention, the controller 14 would receive the velocity anddirection of movement of the car 16 from the processor 28.

[0099] In an alternate embodiment, the speed and direction of the engineare determined in the engine itself, by monitoring the commanded motorrotation direction and speed. The speed can also be detected by arotational encoder.

[0100] As discussed above, the actuators and receivers positioned alongthe path can communicate with the controller along a serialcommunication line according to a communication protocol. The controllercan receive messages from the receivers and the actuators the actuatorscan receive commands from the controller.

[0101] In each message communicated to the controller from one of thereceivers and actuators, the first two bytes of the transmission supplyidentification information to the controller that identifies the sourceof the message. These first two bytes of information include sixteenbits. The first five bits contain class information corresponding to thereceiver or actuator and the last eleven bits supply address informationrelating uniquely to an individual receiver or actuator. Actuators andreceivers can be defined in different classes. Each class type willpreferably include a minimum of 2,048 receiver or actuator addresses.Each receiver or actuator is preferably preprogrammed with addressinformation. However, the invention can be practiced wherein the modelrailroader can modify the address information of a particular receiveror actuator. However, no two receivers or actuators within the networkcan have the same address. Subclasses can be created by using the upperaddress bit to identify different subclasses. This permits a possible65,000 receiver or actuators on the network at one time without havingto divide the network for expansion.

[0102] The invention will preferably include means for verifying receiptof a communication between the controller and a receiver as well as acommunication between the controller and each actuator. In a preferredembodiment of the invention, the process steps for communicatinginformation from a receiver or actuator to the controller are shown inFIG. 15A. The process starts at step 150. At step 152 informationcorresponding to the address of the receiver or actuator, data receivedfrom the transmitter and a verification byte is transmitted to thecontroller. Step 154 determines whether a response to the verificationbyte has been received from the controller. If a response to theverification byte has not been received from the controller, the processreturns to step 152 and the information is transmitted to thecontroller. If the response to the verification byte has been receivedfrom the controller, the process ends at step 156.

[0103] The process steps in a preferred embodiment of the invention fortransmitting a command to a receiver or actuator from the controller areshown in FIG. 15B. The process starts at step 158. At step 160,information corresponding to the receiver or actuator's address, acommand and a verification byte is transmitted to the particularreceiver or particular actuator by the controller. Step 162 monitorswhether a response to the verification byte has been received from thereceiver or actuator. If a response to the verification byte has notbeen received, the process continues to step 160 and the information istransmitted to the controller. If a response to the verification bytehas been received from the receiver or actuator, the process ends atstep 164.

[0104] Automatic Layout Determination

[0105] The present invention also provides an apparatus and method forconfiguring a control system for a model railroad. Existing controlsystems require the model railroader to build the track layout and thenprogram a controller using a particular programming language. Thepresent invention provides a model train having a transmitter fortransmitting information corresponding to the model train, sections oftrack for defining a path; receivers and/or actuators positioned alongthe path to receive information from the model train when thetransmitter is in predetermined proximity to an individual receiver oractuator and to communicate the information to a controller; and acontroller to control the movement of the model train. The model traincan move along the path and transmit a signal to individual receiversand actuators positioned along the path. The signal can correspond toinformation associated with the train or can be a predeterminedinitialization signal. An individual receiver or actuator cancommunicate the signal to the controller with address information uniqueto the individual receiver or actuator. The controller receives thesignal and the information from the individual receivers or actuatorsand can locate the position of the model train with respect to the pathand with respect to each receiver and each actuator. During initialconfiguration of the system, the controller can store in memory theposition of each receiver and actuator with respect to every otherreceiver and actuator.

[0106] At startup, each sensor is placed in learn mode. In this mode,the sensor is assigned to the next sequential address to be used. Thiseliminates the need for the user to program each sensor on the layout.

[0107] During configuration of a control system according to a preferredembodiment of the invention, a car 16 can be moved along every portionof the path 18, coming into predetermined proximity with each receiver12 and each actuator 13 positioned along the path 18. A unique addresscan be assigned to the receiver upon each encounter during the learnmode. Referring now to FIG. 5A, car 16 can come into proximity with thefirst receiver 112. The receiver 112 can communicate to the controller14 (shown in FIG. 5B) that the car 16 is in predetermined proximity withreceiver 112. The car 16 can then come into proximity with a secondreceiver 212 positioned along the path 18. The receiver 212 cancommunicate to the controller 14 that the car 16 is in predeterminedproximity with the receiver 212. The sequence of the communications fromthe receivers 112 and 212 can be stored in the memory of the controllersuch that the controller 14 will recognize that the receivers 112 and212 are positioned along the path 18 adjacent to each other. The car 16can come into proximity with the third receiver 312. The receiver 312can communicate to the controller 14 that the car 16 is in predeterminedproximity with the receiver 312. The sequence of communications from thereceivers 112, 212 and 312 can be stored in the memory of the controller14 such that the controller 14 will issue control commands based, atleast in part, on the positions of the receivers 112, 212 and 312 alongthe path 18 with respect to one another. Specifically, the controller 14will recognize that the receiver 312 is positioned along the pathadjacent to the receiver 212.

[0108] An individual receiver 12 or actuator 13 can be adjacent to oneother receiver 12 or actuator 13 or more than one receiver 12 oractuator 13. The controller 14 can be operable to recognize the positionof every receiver 12 or actuator 13 with respect to every other receiver12 or actuator 13.

[0109] The transmitter 10 of the car 16 can be operable to transmit acommand. For example, the signal transmitted to the receivers 12 andactuators 13 can be a command for the controller to store in memory theassociated address location. The receiver or actuator will communicatethe command to the controller along with the receiver's or actuator'saddress information. The controller 14 can respond to the command bystoring the address information. The controller 14 can store in memorythe address information of receivers 12 and actuators 13 as long as thecar 16 moves along the path 18.

[0110] The controller 14 can be operable to store in memory addresslocations at predetermined times (the learn mode). There are a number ofways to determine when the learn mode is completed. For example, thecontroller 14 can be programmed to store address locations wheninitially engaged. As the controller 14 receives communications from thereceivers 12 and actuators 13, the controller 14 can store the addressinformation of each receiver 12 and actuator 14. The controller 14 canbe programmed to stop storing address information after a predeterminednumber of addresses have been stored twice. Alternatively, thecontroller 14 can be programmed to stop storing addresses afterpredetermined period of time has elapsed. Alternatively, the controller14 can be programmable to store address information continuously.

[0111] The controller 14 can also be programmable to update memory withrespect to address information. For example, the controller 14 can ceasestoring address information after the controller 14 has stored in memorythe address information of every receiver 12 and actuator 13 positionedalong the path 18. After the controller 14 has operated for apredetermined period of time, the controller 14 can store addressinformation again to enhance likelihood that the most accurate addressinformation is stored in memory.

[0112] Table Building

[0113]FIGS. 16 and 17 are illustrations of a simple example of how atable can be constructed in the train controller memory to determine thetrack layout. Shown in FIG. 16 is a portion of a track showing blocks 1,2, 3 and 4, with a switch 5 switching between tracks 3 and 4. Switch 5has an ID number 16312.

[0114]FIG. 17 illustrates a table which can be constructed in memory.The first column has either a 1, indicating it is a track section (ablock), or a 2 indicating a switch. A third alternative is a 3 for acrossover, discussed below.

[0115] The next column sets forth the block ID. In the first row, block2 is shown here. The next two columns show the counterclockwise 1 (CC1)and counterclockwise 2 (CC2) blocks. In a counterclockwise direction,there is only block 1, so there is a 1 in this column, while the secondcounterclockwise option has a 0 (a 0 indicates an empty connection). Inthe clockwise (CW) direction there is one possibility for block 5 (theswitch), indicated for CW1 and CW2. Finally, an indirect column is usedto indicate a non-switch intersection, which there is none here. Thelast column indicates the actuator ID, which does not apply to block 2.

[0116] The next row, begins with the number 2 to indicate a switch. Thiscorresponds to switch 5, as indicated in the block ID section. Here, inthe counterclockwise direction there is block 2, and a 0 (indicating noconnection) for the second counterclockwise direction. In the clockwisedirection, there are blocks 3 and 4, similarly to block 2. In the lastcolumn, the actuator ID is set forth.

[0117]FIGS. 18 and 19 illustrate how the table can be built. In FIG. 18,a train passing from block 1 to block 2 can detect sensors (or thesensors can detect it) at each of the blocks. When it passes from block1 to block 2, the first entry for block 1 indicates in the clockwisedirection that the next block is 2. Similarly, for block 2, since thetrain passed from 1 to 2, it knows that in the counterclockwisedirection is block 1. Thus, the two entries shown in FIG. 18 can befilled in.

[0118]FIG. 19 assumes switch 5 has not been thrown, and the trainprogresses from block 2 to block 3. When it crosses into block 3, it canfill in the second entry for block 2, indicating that in that in theclockwise direction (CW) is block 3. Similarly, for block 3, it canindicate that in the counterclockwise (CC) direction is block 2. As canbe seen, by having the train continue through all the blocks in thelayout, all of the remaining columns and rows can be filled in.

[0119]FIGS. 20 and 21 indicate a crossover and the table entriescorresponding to it. Blocks 2 and 5 in FIG. 21 have entries similar tothose discussed above, except that they also have an indirect entry.Block 2 has an indirect entry 5, indicating that a train in block 2means that there can not also be a train in the indirect block 5 withoutthe potential for a collision. Similarly, block 5 indicates in itsindirect column block 2.

[0120]FIG. 22 is an example of a somewhat complex track layout withmultiple blocks and switches. FIG. 23 indicates the entries,corresponding to those discussed above, for all of these blocks andswitches from 1-61. In this example, there are no indirect blocks, andaccordingly this column is left off. As can be seen from the numbers inthe first row, all of the elements are either blocks or switches. Forexample, the third row is a switch corresponding to number 3 in FIG. 22.As can be seen, for switch 3 in the counterclockwise direction is block2, with no other option, and thus a 0 in the next column. In theclockwise direction is only block 23 and not block 24 since a traincoming from 2 to switch 3 can not be switched onto block 4 because ofthe extreme angle.

[0121] The controller in one embodiment contains pattern recognitionalgorithms. This allows recognition of loops, sidings, reverse loops,single and double ended tracks, etc. This patterns can be displayed on amonitor with a graphical representation of the track, and also can beused for route determination.

[0122] Operational Control, Collision Avoidance

[0123] The controller 14 can emit commands to the receivers andactuators based, at least in part, on the address information stored inmemory. The controller 14 can emit commands to one or more receivers 12or actuators 13. The commands issued by the controller 14 can coordinatethe movement of one or more cars 16 moving along the path 18 to preventcollisions between the cars 16. The commands can also control theoperation of any other device in proximity of the path 18 such as trackswitches, light generating devices, sound generating devices, and motiongenerating devices. The following are examples that illustrate some ofthe actions that can be performed by the controller 14:

EXAMPLE 1

[0124] As shown in FIG. 14A, two cars 16 c and 16 d can approach aswitch section 20 g of track moving in opposite directions 106 and 108.The controller 14 can stop the movement of the car 16 d before the car16 d reaches the switch section 20 g. The controller 14 can emit acommand to an actuator 13 to move a switch 15 and prevent the car 16 cfrom following the section 110 of the switch section 20 g. Thecontroller 14 can also emit wave signals to stop or slow the car 16 d toreduce the likelihood that the cars 16 c and 16 d will collide.Subsequent to the movement of the car 16 c past the switch section 20 g,the controller 14 can engage the car 16 d to move in the direction 108to the switch section 20 g and section 113.

EXAMPLE 2

[0125] As shown in FIG. 14B, two cars 16 e and 16 f can approach aswitch section 20 h of track moving in opposite directions 106 a and 108a, respectively. The controller 14 can emit a command to an actuator 13b to move a switch 15 a and prevent the car 16 f from moving to thesection 114 a of the switch section 20 h. The car 16 f will follow thesection 110 a to the end 42 a and be stopped by a wave signal emitted bythe controller 14. The car 16 e will move past the switch section 20 g,along section 112 a in the direction 106 a. The controller 14 will thenmove the car 16 f in a reverse direction with respect to direction 108a, returning the car 16 f to the section 112 a. The controller 14 canthen switch the switch section 20 h and move the car 16 f in thedirection 108 a, past the switch section 20 h and section 114 a.

[0126] If necessary, the controller 14 can also modify the velocities ofthe cars 16 e and 16 f as the cars approach the switch to ensure thatthe car 16 f can reach the end 42 a before the car 16 e reaches theswitch section 20 h. In addition, the controller 14 can also determinethe number and configuration of cars being pulled by the car 16 f toensure that the length of the

EXAMPLE 3

[0127] As shown in FIG. 14C, two cars 16 g and 16 h can approach ax-section 20 i of track moving in different directions 106 b and 108 b,respectively. The controller 14 can control the movement of the cars 16h and 16 g with wave signals to avoid a collision between the cars 16 hand 16 g.

[0128] Accessory Control

[0129] The present invention thus provides a system for uniquelyidentifying a particular train by its ID, and what block of the layoutit is positioned at by the sensors or position indicators on the track.This provides additional capabilities. For example, the controller canstore in its memory what type of train each ID corresponds to.Accessories positioned around the layout can respond to the type oftrains which come by. For example, a train platform adjacent aparticular block can have the sound come on for a train arrivalannouncement only when passenger trains arrive at that block. When atrain approaches that station, and spots the position identifier, itprovides a signal, or a sensor provides a signal, back to the controllerwith the train ID. The controller can then look up in its memory thetype of train to determine if it is a passenger train, and determine ifthere is a platform nearby which has been programmed to emit the soundupon the approach of passenger trains. If there is a match, the soundwill be activated.

[0130] Automated Accessory and Switch Control

[0131] In one embodiment, the present invention presents an accessory orswitch to the user for the user to control. In existing systems, a usermay need to first select which switch, then determine which direction tothrow the switch. Similarly, the user may need to select a particularaccessory, then select one of multiple options for operation of thataccessory. The system of this invention can automatically determine thenext switch and accessory to be encountered by the vehicle base on itsdirection and location on the track layout. The next switch is thenallocated to a switch button on a hand-held controller, or is associatedwith a first switch on another type of controller. The next accessorycan be allocated to an accessory button. Thus, the user doesn't need tosearch through and select the switch and accessory, but merely needs todetermine what to do with them. And, in the fully automatic optiondescribed above, the need to select the option could also optionally beautomated.

[0132] Thus, the present invention enables the automatic activation ofappropriate accessories on a discriminating basis, without requiringactive intervention by the operator. The operator can set these up inadvance by appropriate programming, thus being free to concentrate onother things during operation of the train system.

[0133] Other examples of accessories could include a dog which barksonly when red engines go by. Another example might be a crane forloading only freight trains having the type of cars to be loaded. In oneembodiment, the sensor either on the track or on the train could be in aparticular car of the train, as opposed to the engine.

EXAMPLE 4

[0134] As shown in FIG. 14D, a car 16 i can approach an model trainaccessory, such as a model train station 116. The station 116 caninclude a light generating device 118 and a sound generating device 120in communication with an actuator 13 d. Although not shown in FIG. 14D,in an alternate embodiment of the present invention the station 116 caninclude only a light generating device 118 or only a sound generatingdevice 120. Furthermore, the station 116 can include a motion generatingdevice to, for example, open doors or windows at the station 116. Inaddition, accessories other than a station 116 can be practiced in thepresent invention.

[0135] In proximity to the path 18 are two receivers 12 c and 12 dhaving detectors 25 c and 25 d, respectively. Actuator 13 d includesdetector 117 d. The receiver 12 c communicates to the controller 14 whenthe car 16 i comes into proximity with the detector 25 c. The controller14 can emit a command to the actuator 13 d to engage light generatingdevice 118 and generate light. For example, the station 116 can beilluminated by the proximity of the car 16 i as a real station would beilluminated by the arrival of a real train.

[0136] In addition, the controller 14 can emit a command to the actuator13 d to engage sound generating device 120 to emit a predeterminedsound. For example, the sound generating device 120 can emit anannouncement that the car 16 i has arrived. Furthermore, the controller14 can emit commands to the actuator 13 d to engage the sound generatingdevice 120 to emit one of several different sounds. Since the controller14 can uniquely identify each model train moving along the path 18, thecontroller 14 can emit a command to the actuator 13 d to engage thesound generating device 120 to emit sounds associated with car number orcar type of car 16 i. For example, the sound generating device 120 canbe commanded to emit an announcement that the car 16 i has arrivedrather a generic announcement that a car has arrived.

[0137] The controller 14 can also control movement of the car 16 i witha wave signal to stop the car 16 i at a desired position adjacent thestation 116. For example, the controller 14 can control the car 16 i tostop when the car 16 i comes into proximity with the detector 117 d ordetector 25 d. If the car 16 i is pulling other cars, the car 16 i canbe stopped so that pulled cars would be immediately adjacent the station116 as real cars would be adjacent a real station.

[0138] The controller 14 can also control the car 16 i to move past thestation 116 without stopping if, for example, the car 16 i is notpulling any other cars. Also, if the car 16 i is a cargo train pullingcargo cars and the station 116 is designated as a passenger station, thecar 16 i can be moved past the station 116 to an area of the path 18designated for cargo activity such as loading and unloading.

EXAMPLE 5

[0139] In FIG. 14E, a representative cargo activity is schematicallyrepresented. The car 16 j is moving along the path 18 pulling a cargocar 16 k. The cars 16 j and 16 k approach a cargo transferring station124. The station 124 includes a motion generating device 128 and a soundgenerating device 130. The motion generating device 128 and a soundgenerating device 130 are engaged by actuator 13 e in communication withthe control 14. Although not shown, the station 124 can include a lightgenerating device and need not include a sound generating device 130.The controller 14 can slow the car 16 j with wave signals as the car 16j moves toward the station 124 and stop the car 16 j when the car 16 kcomes into proximity with the detector 117 e. The controller 14 can emita command to the actuator 13 e to move the motion generating device 128to add or remove cargo from the car 16 k. The actuator 13 e cancommunicate with the controller 14 when the cargo transferring activityhas been completed. The controller 14 can then engage the car 16 i tomove away from the station 124.

[0140] The examples provided above are illustrative and the controlleris not limited to the operations described in the examples. The varietyof known model railroad accessories and known activities occurring inmodel railroad systems cannot be fully described, but the method andapparatus of infrared communication described herein can be practicedwith any of these accessories or activities currently known in the modelrailroad art.

[0141] The present invention also provides input means for controller14. Input means can be used by a model railroader to control theoperation of one of the cars 16 moving along the path 18 while thecontroller 14 controls the movement of the other cars 16 moving alongthe path 18.

[0142] Train Length Indication

[0143] In one embodiment, the caboose or trailing car of a train canhave a marker or sensor so that the passage of both the beginning andend of a train can be determined. This could be done constantly, orcould be done once with the length of the train being stored in memory.This allows, for example, an intelligent determination of whether thetrain will fit on a siding so that the controller can present availableoptions to an operator for moving the train. Similarly, based on thetrain speed as transmitted to the controller and its length, adetermination can be made of how long it will take for the train to passover a switch or crossover, thereby determining when a train on acollision course can safely approach. This could either provide awarning to the operator, or could automatically slow down the othertrain the appropriate amount of time to allow passage at the currentspeed of the first train.

[0144] Automated Route Generation

[0145] In one embodiment, once a layout of the track has been determinedas discussed above, the controller can automatically present routeoptions to an operator. For example, the operator can simply input thedesired starting and ending locations, and the controller can provide agraphical display illustrating the available routes. In one embodiment,the routes can be ranked or listed according to certain criteria. Forexample, the route with the minimum number of reversals required inorder to get the train to its destination can be set forth. Another typeof route might specify how a train can arrive in reverse, so that thecars can be backed in to an unloading station, for example. Thecontroller can provide facing point moving routes and trailing pointmoving routes.

[0146] Alternate Roadways

[0147] As used herein, the term “track” is intended to refer to not onlya train track, but a roadway or other transportation path, such as aflight path in three dimensions. For example, instead of a track, a roadrace game can have multiple road blocks with similar switching andcrossovers. Additionally, multiple lanes could be routed on the roadway,instead the sidings often available in a railroad track layout. Sensorscould determine not only what roadway block the car is on, but also thelane it is in.

[0148] Fine Distance Measurement

[0149] A rotary encoder on the vehicle can be used to further define theposition of the engine or car between blocks. The sensors are used toreset the position of the vehicle location. As the wheels turn, thefractional part of the revolution is recorded. So, for example, distancecan be described as 3 revolutions and 20 ticks past sensor 4 (where 4 isthe last sensor passed, 3 is the number of complete rotations of thecounting wheel located on the vehicle and 20 is the number of pulses inthe fractional revolution).

[0150] While the invention has been described in connection with aparticular embodiment, it is to be understood that the invention is notto be limited to the disclosed embodiments. For example, thetransmission to the controller could be from the vehicle (train) or asensor. The transmission from the train could be wireless, or could betransmitted electrically through the wheels of the train as a signalalong the track to the controller. Accordingly, the invention isintended to cover various modifications and equivalent arrangementsincluded within the scope of the appended claims, which scope is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures as is permitted under the law.

What is claimed is:
 1. A method for activating an accessory in a modelvehicle layout, comprising: receiving a first signal indicating avehicle ID; receiving a second signal indicating a vehicle location;sending an activating signal to an accessory adjacent said vehiclelocation if said vehicle ID corresponds to a group of vehiclesdesignated to activate said accessory.
 2. The method of claim 1 furthercomprising: storing a table associating vehicle IDs with groupsdesignated to activate at least one accessory; and comparing receivedvehicle IDs to said table.
 3. The method of claim 1 wherein said vehicleID identifies a group, with multiple vehicles sharing said vehicle ID.4. An apparatus for use in a model vehicle layout, comprising: anaccessory mounted adjacent a track of said vehicle layout; a vehiclehaving a vehicle ID; a position detection element having an positiondetection element ID; a transmitter configured to transmit said vehicleID and said position detection element ID; a controller, configured todetermine if said vehicle ID corresponds to a group of vehiclesdesignated to activate said accessory, and to send an activating signalto said accessory upon a match.
 5. The apparatus of claim 4 furthercomprising: a table associating vehicle IDs with groups designated toactivate at least one accessory; and said controller being configured tocompare received vehicle IDs to said table.